﻿/// <reference path="../../Scripts/jquery-1.7.2-vsdoc.js" />
/// <reference path="ProggyCore.js" />

// content home object
Proggy.ContentHome = function () {

    // Init function
    this.Init = function () {

        // get site map object
        var sm = jQuery("div.proggy-sm:first");

        //fade
        sm.fadeTo(0, 0, function () {

            // pause
            window.setTimeout(function () {

                // fade in
                sm.fadeTo(500, 1, function () {

                    // get selected a
                    var slct = jQuery("a.proggy-sm-preview-link-selectedTrue");

                    // click
                    slct.click();

                    // find anchor
                    var anch = slct.next("a:first");

                    // check
                    if (anch.size() == 0) {
                        anch = slct.parent().next("a:first");
                    }

                    // focus
                    anch.focus()

                });

            }, 500);

        });

        // 
        Proggy.Static.BindPreview();

    };
};